package com.hf.buildtb.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="FA_UNIT")
public class FaUnit implements  Serializable  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8804257649038445847L;
	
	@Id
	@Column(name="id",length=36,nullable=false)
	private String id;
	
	@Column(name="name",length=36,nullable=false)
	private String name;
	
	
	@ManyToOne(optional=false,fetch=FetchType.LAZY)
	@JoinColumn(name = "typeid")		
	private FaUnitType type;	
	

	@Column(name="enable",nullable=false)
	private boolean enable;
	
	@Column(name="py",length=36,nullable=false)
	private String py;
	
	@Column(name="wb",length=36,nullable=true)
	private String wb;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

 

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public String getPy() {
		return py;
	}

	public void setPy(String py) {
		this.py = py;
	}

	public String getWb() {
		return wb;
	}

	public void setWb(String wb) {
		this.wb = wb;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	

	public FaUnitType getType() {
		return type;
	}

	public void setType(FaUnitType type) {
		this.type = type;
	}

	

}
